/****************************************************************************
 * Copyright (C) 2011 Maxim Integrated Products, All Rights Reserved.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included
 * in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY,  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 * IN NO EVENT SHALL MAXIM INTEGRATED PRODUCTS BE LIABLE FOR ANY CLAIM, DAMAGES
 * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 *
 * Except as contained in this notice, the name of Maxim Integrated Products
 * shall not be used except as stated in the Maxim Integrated Products
 * Branding Policy.
 *
 * The mere transfer of this software does not imply any licenses
 * of trade secrets, proprietary technology, copyrights, patents,
 * trademarks, maskwork rights, or any other form of intellectual
 * property whatsoever. Maxim Integrated Products retains all ownership rights.
 *
 *     Description: MAXQ20 type definitions
 *             $Id: maxq_types.h 4067 2012-05-16 14:01:22Z jeremy.brodt $
 *
 ********************************************************************************
 */

/** 
* \file
* \brief    MAXQ20 type definitions
*/

#ifndef _MAXQ_TYPES_H
#define _MAXQ_TYPES_H

#ifdef  __CROSSWORKS
#include <stdint.h>
// Constant data to be placed into code
#define maxq_const  const __code
#endif

#ifdef __IAR_SYSTEMS_ICC__
// Constant data to be placed into code
// Select "Place constants in CODE" in project options
#define maxq_const  const

// Needed for source code compatibility with Rowley
#define C
#endif

#if (__IAR_SYSTEMS_ICC__ || DOXYGEN)

/// 8-bit signed data type
typedef signed char	int8_t;

/// 8-bit unsigned data type
typedef unsigned char	uint8_t;

/// 16-bit signed data type
typedef signed int     	int16_t;

/// 16-bit unsigned data type
typedef unsigned int 	uint16_t;

/// 32-bit signed data type
typedef signed long	int32_t;

/// 32-bit unsigned data type
typedef unsigned long	uint32_t;

#endif /* (__IAR_SYSTEMS_ICC__ || DOXYGEN) */

/// boolean data type
typedef unsigned char	boolean;

#ifndef TRUE
/// boolean data type value
#define TRUE    (1)
#endif
#ifndef FALSE
/// boolean data type value
#define FALSE   (0)
#endif

#ifndef NULL
/// boolean data type value
#define NULL    (0)
#endif

#ifndef MAXQ_SUCCESS
/// \brief    Driver function successful return value.
/// \details  Evaluates as TRUE in conditionaly statements
#define MAXQ_SUCCESS       (1)
#endif
#ifndef MAXQ_FAILURE
/// \brief    Driver function failure return value.
/// \details  Evaluates as FALSE in conditionaly statements
#define MAXQ_FAILURE       (0)
#endif

#endif      // _MAXQ_TYPES_H
